<!DOCTYPE html>
<!-- saved from url=(0037)http://127.0.0.1/wx/ybss/zhuce/zc.jsp -->
<html class="pixel-ratio-1"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <title>功能权限</title>

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!--[if IE]>
  <script src="http://127.0.0.1:80/wx/ybss/js/html5shiv.min.js"></script>
  <![endif]-->
  <link rel="stylesheet" href="../css/switch.css" type="text/css">
  <script src="../resource/jquery1.js"></script>
  <script type="text/javascript" src="../script/switch.js"></script>
  <script src="../script/api.js"></script>

  <script>

   
  </script>

  <style>
   body {
    overflow-x:hidden;
    margin: 0;
   }
   html {
    overflow-x:hidden;
   }
   .odiv{
   display:table;
   background:#fff;
   width:100%;
   padding:3px;
   border-top:3px solid #E1E1E1; 
   border-bottom:1px solid #fff;
   }
   .idiv{
   float: left;
   font-size:15px;
   margin-left: 10px;
   height:40px;
   line-height:40px;
   }
   .twinkle{
     -webkit-tap-highlight-color:transparent;
   }
label {font-size:18px;cursor:pointer;margin-right:15px;height:40px;line-height:40px;}
label i {font-size:18px;font-style:normal;display:inline-block;width:18px;height:18px;text-align:center;line-height:18px;color:#fff;vertical-align:middle;margin:-2px 2px 1px 0px;border:#2489c5 1px solid;}
input[type="checkbox"] {display:none;}
input[type="checkbox"]:checked + i {background:#2489c5;}
input[type="checkbox"]:disabled + i {border-color:#ccc;}
input[type="checkbox"]:checked:disabled + i {background:#ccc;}
  </style>

</head>
<body style="background:url(../image/bj.png) repeat-x 0 80px;background-size:100%">
<div style="height:550px;background:url(../image/mainbg.png) no-repeat right 0 bottom 0%;background-size:80%" >
<div>
       <header id="statusBar">
        <img id="banner1" src="../image/top.png" style="width: 100%;position:relative;">
        </header>

		<div style="width:100%;display:table;background: #fff;height:51px;line-height: 51px;" >
		<div style="" tapmode="presshover" onclick="api.closeWin();">
		<div style="float:left;display: flex;align-items: center;justify-content: center;height:51px;width:8%;">
			<div style="width:60%;">
			 <img style="display:block;width:100%;height:100%;" src="../image/blc_back.png" />
			</div>
			</div>
			<div style="float:left;height:51px;line-height: 51px;">返回
			</div>
			</div>
			 
		<div style="height:51px;line-height: 51px;text-align:center;width:85%;">
		功能模块
		</div>	
		</div>
          <div style="height:20px"></div>

         <div class='odiv'>  
          <div class='idiv'>公安服务</div>
          <div style="float: right;height:100%;">
            <label class="twinkle" tapmode="presshover"><input type="checkbox" id="police" value="1"/><i>✓</i></label>
          </div>
          </div>
          
           <div class='odiv'>  
          <div class='idiv'>金穗采购</div>
          <div style="float: right;height:100%">
          <label class="twinkle" tapmode="presshover"><input type="checkbox" id='purchase' value="2"/><i>✓</i></label>
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>公安娱乐业</div>
          <div style="float: right;height:100%">
            <label class="twinkle" tapmode="presshover"><input type="checkbox" id='enterma' value="3"/><i>✓</i></label>
          </div>
          </div>
          
          <div class='odiv'>  
          <div class='idiv'>企业收款</div>
          <div style="float: right;height:100%">
            <label class="twinkle" tapmode="presshover"><input type="checkbox" id='gathering' value="4"/><i>✓</i></label>
          </div>
          </div>
          
         <!-- <div class='odiv'>  
          <div class='idiv'>旅馆管理</div>
          <div style="float: right;height:100%">
            <label class="twinkle" tapmode="presshover"><input type="checkbox" id='hotel' value="5"/><i>✓</i></label>
          </div>
          </div>-->
          
         <!-- <div class='odiv'>  
          <div class='idiv'>九寨沟旅游</div>
          <div style="float: right;height:100%">
            <label class="twinkle" tapmode="presshover"><input type="checkbox" id='jzgTourism' value="6"/><i>✓</i></label>
          </div>
          </div>-->
</div>
  
<script>
      
    function splitStr(str, s) {
        var newStr = "";
        var strArray = str.split(s);
        for (var i = 0; i < strArray.length; i++) {
            newStr += strArray[i];
        }
        return newStr;
    }
	   
	$("#police").change(function(){  
	  var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='police']").is(':checked') == true){
        security = security+$("#police").val()
      }else{
        var str = $("#police").val();
        security = splitStr(security,str);
      }
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });  
     
    $("#purchase").change(function(){  
       var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='purchase']").is(':checked') == true){
        security = security+$("#purchase").val()
      }else{
        var str = $("#purchase").val();
        security = splitStr(security,str);
      }
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });  
    
    $("#enterma").change(function(){  
       var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='enterma']").is(':checked') == true){
        security = security+$("#enterma").val()
      }else{
        var str = $("#enterma").val();
        security = splitStr(security,str);
      }
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });  
     
     
     $("#gathering").change(function(){  
       var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='gathering']").is(':checked') == true){
        security = security+$("#gathering").val()
      }else{
        var str = $("#gathering").val();
        security = splitStr(security,str);
      }
      //alert(security);
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });  
    
    $("#hotel").change(function(){  
       var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='hotel']").is(':checked') == true){
        security = security+$("#hotel").val()
      }else{
        var str = $("#hotel").val();
        security = splitStr(security,str);
      }
      //alert(security);
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });  
    
	$("#jzgTourism").change(function(){  
       var security = $api.getStorage("rootid");
	  if(security == "undefined" || typeof(security) == "undefined"){
	    security = "";
	  }
      if($("input[id='jzgTourism']").is(':checked') == true){
        security = security+$("#jzgTourism").val()
      }else{
        var str = $("#jzgTourism").val();
        security = splitStr(security,str);
      }
      //alert(security);
      $api.setStorage("rootid",security);
      api.sendEvent({
	        name:'reloadIndex'
        });
    });
    
	apiready = function(){
	    api.parseTapmode();
	    if(api.systemType == "ios"){
           document.getElementById("statusBar").style.background = "#298cb4";
        }
	    $api.fixStatusBar( $api.dom('header') );
		var rootid = $api.getStorage("rootid");
		if(rootid != "" && rootid != null && typeof(rootid) != 'undefined'){
			if(rootid.indexOf("1")>=0){
				document.getElementById("police").checked = true;
			}
			if(rootid.indexOf("2")>=0){
				document.getElementById("purchase").checked = true;
			}
			if(rootid.indexOf("3")>=0){
				document.getElementById("enterma").checked = true;
			}
			if(rootid.indexOf("4")>=0){
				document.getElementById("gathering").checked = true;
			}
			if(rootid.indexOf("5")>=0){
				document.getElementById("hotel").checked = true;
			}
			if(rootid.indexOf("6")>=0){
				document.getElementById("jzgTourism").checked = true;
			}
		}
	}
</script>
	
</div>
</body></html>